// 假设调整后的正确路径，需根据实际项目结构修改
import { createRouter, createWebHistory } from './path/to/vue-router'
import EventList from '../components/EventList.vue'
import EventDetail from '../components/EventDetail.vue'
import Login from '../components/Login.vue'

const routes = [
  {
    path: '/',
    redirect: '/events'
  },
  {
    path: '/events',
    name: 'EventList',
    component: EventList
  },
  {
    path: '/events/:id',
    name: 'EventDetail',
    component: EventDetail
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router